<!DOCTYPE html>
<!-- Reader -->
<!--<html lang="en">-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>图书管理系统</title>
    <link rel="stylesheet" href="css/iconfont.css">
    <link rel="stylesheet" href="css/reader_searchbook.css">
    <script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.js"></script>
    <script type="text/javascript">
        function searchbook(){
            var book = $("[name=bookname]").val();
            if(book != ""){
                window.location.href = "/reader_search_result_no?bname="+book;
            }else{
                $("#message").html("The book name cannot be empty!");
                $("#tanchuceng").css("display","block");
            }
        }
        function exit(){
            $("#tanchuceng").css("display","none");
        }
        $(function(){
            $.ajax({
                url : "/refresh",
                type : "post",
                data: {},
                success : function(data){
                    if(data == "yes"){
                        console.log("refresh succeed!");
                    }
                }
            })
        })
    </script>
</head>
<body>
    <div class="main clearfix">
        <header class="header clearfix">
            <i class="iconfont icon-yun"></i>
            <i>Library</i>
            <ul class="topmenu clearfix">
                <li><a href="/notice/to">Public Notice</a></li>
                <li>
                    <a href="">language</a>
                    <div class="submenu">
                    </div>
                </li>
               <li>
                   <!-- <a name="login" href="">Login<span class="arrow"></span></a>-->
                  <a class="title" href="javascript:;">Login<span class="arrow"></span></a>
                   <div class="identify">
                       <div class="reader">
                           <a href="/readerlogin">Reader</a>
                       </div>
                       <div class="librarian">
                           <a href="/user/login">Librarian</a>
                       </div>
                   </div>
               </li>
               <li><a href="">Home</a></li>
           </ul>
       </header>
       <div class="content clearfix">
           <p class="saying" style="text-align: center; font-size: 50px;font-weight: bold; font-family: Pristina;  margin-top: 15%;">
               Books are the ladder of human progress——Gorky
           </p>
           <div class="search-box">
               <i class="iconfont icon-sousuo"></i>
               <input type="text" name="bookname" placeholder="Type to search" required >
               <button id="btn" onclick="searchbook()">Search</button>
           </div>
       </div>

       <footer class="footer">
           <div class="mandarin">
               <img src="images/mandarin.png" alt="">
           </div>
           <p>Shan ICP number18018134 | Powered by 1713011</p>
       </footer>
   </div>

   <div id="tanchuceng">
       <div id="msg">
           <div id="exit" onclick="exit()">x</div>
           <p id="message"></p>
       </div>
   </div>
</body>
</html>